${page.setTitle("push-center| GOPS")}
<div class="body-pla-content">
	<div class="s-table-wapper">
	<form action="">
		<table class="s-table">
			<tr>
				<td>
					渠道：
				</td>
				<td>
					<select name="appChannel" id="appChannel"  enum="channels.type" style="width:135px">
					</select>
				</td>
				<td>
					推送结果：
				</td>
				<td>
					<select name="status" id="status"  enum="sendstatus.result" style="width:135px">
					</select>
				</td>
				
			</tr>
			<tr>
				<td>
					接收人id：
				</td>
				<td>
					<input type="text" name="receiveId"  id="receiveId" value="${receiveId!}"/>
				</td>
				<td>
					appId：
				</td>
				<td>
					<input type="text" name="appId"  id="appId" value="${appId!}"/>
				</td>
				<td>
					起始时间：
				</td>
				 
					<td><input type="text" name="start"  id="start" value="${start!}"/></td>
					<td>至</td>
					<td><input type="text" name="end"  id="end" value="${end!}"/></td>
				<td><input id="btnSearch"  type="button" value="查询"  class="l-button"/>
				</td><td><input type="reset" value="清空" class="l-button l-button-reset"/> 
				</td>	
			</tr>
		</table>
		</form>
	</div>
	<div id="maingrid" style="margin:0; padding:0"></div>
	<div style="display:none;">
</div>



<script type="text/javascript">
//初始化时间控件
 $("#start").ligerDateEditor();
 $("#end").ligerDateEditor();
var grid;
$(function () {
	epay_enum.iniSelect();
     var columns= [
       				{ display: 'ID', name: 'id', width: 100},
       				{ display: '接收人id', name: 'receiveId', width: 100},
       				{ display: '消息内容', name: 'content', width: 100,render: function (item){
			   				return "<a title='"+item.content+"'>"+item.content+"</a>";
			  			}
			  		},
       				{ display: '模版id', name: 'templateId', width: 70},
       				{ display: '类型', name: 'type', render:epay_enum.sendtype.type.render},
       				{ display: '状态', name: 'status',  render:epay_enum.sendstatus.result.render},
       				{ display: 'app_id', name: 'appId', width: 100},
       				{ display: 'app_channel', name: 'appChannel',render:epay_enum.channels.type.render},
       				 { display: '群发列表', name: 'uidList', width: 100,render: function (item){
			   				return "<a title='"+item.uidList+"'>"+item.uidList+"</a>";
			  			}
			  		},
       				{ display: '修改时间', name: 'gmtModified', width: 150,type:"datetime2"},
       				{ display: '结果返回', name: 'memo', width: 100,render: function (item){
			   				return "<a title='"+item.memo+"'>"+item.memo+"</a>";
			  			}
			  		}
                   ];
	grid = $("#maingrid").ligerGrid({
						columns:columns,
						checkbox:false,
						enabledSort:false,
						pageSize:20,
						dataAction:'server',
						root:'rows',
						record :'total',
						pageParmName :'page',
						pagesizeParmName :'pageSize',
						width: '100%',
						height:'90%',
						url:'${appServer}/order/history/query.json',
						parms : $("form").serializeArray(),
						method:'get',
						onSuccess:function(data, grid){
							//alert(JSON.stringify(data));
							//alert(data.code);
							if(data.hasError){
								$.ligerDialog.error(data.message);
							}
						}
					});
     	
     $("#pageloading").hide();
     
      $("#btnSearch").click(function(){
		 search();
	 });
});

function search(){
	 var appKey=$("#appKey");
 	 grid.setOptions( {
 		  		url: '${appServer}/order/history/query.json',
 		  		pageSize:20,
 		  		page:1,
 		  		content:'content',
 		  		recieveId:'receiveId',
 		  		dataAction:'server',
                parms : $("form").serializeArray()
         });
}

</script>
